package com.cherish.pattern.singleton.register;

/**
 * @Classname EnumSingleton
 * @Date 2019/3/11 23:31
 * @Author admin
 * @Description 注册式单例模式  推荐写法
 */
public enum EnumSingleton {

    INSTANCE;

    private Object obj;

    public Object getObj() {
        return obj;
    }

    public void setObj(Object obj) {
        this.obj = obj;
    }

    public static EnumSingleton getInstance() {
        return INSTANCE;
    }
}
